﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Articles._Default" %>

<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">

    <asp:GridView ID ="Giv" runat ="server" AutoGenerateColumns="False" OnRowCancelingEdit ="Giv_RowCancelingEdit" OnRowEditing ="Giv_RowEditing" OnRowDeleting ="Giv_RowDeleting"  OnRowUpdating ="Giv_RowUpdating" DataKeyNames="Id" DataSourceID="SqlDataSource2" >
        <Columns >
            <asp:BoundField DataField ="Id" HeaderText ="Id" ReadOnly ="true" InsertVisible="False" SortExpression="Id" />
            <asp:BoundField DataField ="Title" HeaderText ="Title" SortExpression="Title"  />
            <asp:BoundField DataField ="Content" HeaderText ="Content" SortExpression="Content" />
            <asp:BoundField DataField ="Author" HeaderText ="Author" SortExpression="Author"  />
            <asp:CheckBoxField DataField="IsActived" HeaderText="IsActived" SortExpression="IsActived" />
            <asp:CheckBoxField DataField="IsDeleted" HeaderText="IsDeleted" SortExpression="IsDeleted" />
            <asp:BoundField DataField ="CreatedTime" HeaderText ="CreatedTime" SortExpression="CreatedTime" />
            <asp:BoundField DataField="UpdatedTime" HeaderText="UpdatedTime" SortExpression="UpdatedTime" />
            <asp:BoundField DataField="Remarks" HeaderText="Remarks" SortExpression="Remarks" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>" SelectCommand="SELECT * FROM [Articles]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>
    <asp:Button ID="tj" runat="server" Text="新增" OnClick ="tj_Click" />
</asp:Content>
